import Vue from 'vue'
import Router from 'vue-router'
import Home from '../View/HomePage/Home'
import TeacherTraining from "../View/TeacherTrainingPage/TeacherTraining";
import Cooperation from "../View/CooperationPage/Cooperation";
import Login from "../View/LandingPage/Login";
import Register from "../View/RegisterPage/Register";
import Help from "../View/HelpPage/Help";
import LandHome from "../View/LandHomePage/LandHome";
import Course from "../View/CoursePage/Course";
import Classmate from "../View/ClassmatePage/Classmate";
import ForgetPassword from "../View/ForgetPassword/ForgetPassword";
import changePassword from "../View/ChangePassword/changePassword";
import OperationDetails from "../View/ OperationDetails/OperationDetails";
import test from "../View/Test/test";
Vue.use(Router)
Vue.use(Classmate)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/test',
      name: "test",
      component: test
    },
    {
      path: '/teacherTraining',
      name: 'TeacherTraining',
      component: TeacherTraining
    },
    {
      path: '/channel',
      name: 'Cooperation',
      component: Cooperation
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/register',
      name:'Register',
      component: Register,
    },
    {
      path: '/help',
      name: 'Help',
      component: Help,
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    },
    {
      path: '/Main',
      name: LandHome,
      component:LandHome,
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
      // redirect:LandHome,


    },
    {
      path: '/Course',
      name:Course,
      component: Course,
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    },
    {
      path: '/Classmates',
      name: Classmate,
      component: Classmate,
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    },
    {
      path: '/forgetPassword',
      name: ForgetPassword,
      component: ForgetPassword,
    },
    {
      path: '/changePassword',
      name: changePassword,
      component: changePassword,
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    },
    {
      path: '/operationDetails',
      name: OperationDetails,
      component: OperationDetails,
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    }

  ]
});




